package com.shanzmoo.admin.domain.dto;

import cn.hutool.core.bean.BeanUtil;
import com.shanzmoo.db.store.entity.StorePurchaseBillDetailEntity;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.io.Serializable;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


/**
 * 采购单明细 保存对象
 *
 * @author xueqz 2021-03-07
 */
@Data
@ApiModel("采购单明细-保存对象")
public class StorePurchaseBillDetailSaveDTO implements Serializable {

    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "采购货单id")
    private Integer billId;

    @ApiModelProperty(value = "商品编码")
    private String sku;

    @ApiModelProperty(value = "采购数量")
    private Integer purchaseNum;

    @ApiModelProperty(value = "实际收货数量")
    private Integer receiveNum;

    @ApiModelProperty(value = "采购单价")
    private BigDecimal unitCost;

    @ApiModelProperty(value = "采购总价")
    private BigDecimal totalCost;

    @ApiModelProperty(value = "创建人")
    private Integer createUser;

    @ApiModelProperty(value = "更新人")
    private Integer updateUser;

    @ApiModelProperty(value = "逻辑删除，0-未删除 1-已删除")
    private Boolean deleted;

    public StorePurchaseBillDetailEntity convertEntity() {
        StorePurchaseBillDetailEntity target = new StorePurchaseBillDetailEntity();
        BeanUtil.copyProperties(this, target, true);
        return target;
    }
}
